package com.control.qct.businesssteward.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.control.qct.businesssteward.R;
import com.control.qct.businesssteward.adapter.ReplenishmentOrderDetailAdapter;
import com.control.qct.businesssteward.base.BaseFragment;
import com.control.qct.businesssteward.model.ReplenishmentOrderModel;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/1/17 0017.
 */

public class ReplenishmentOrderDetailFragment extends BaseFragment {
    @BindView(R.id.tv_receipts_date)
    TextView mTvReceiptsDate;
    @BindView(R.id.tv_receipts_code)
    TextView mTvReceiptsCode;
    @BindView(R.id.tv_replenishment_type)
    TextView mTvReplenishmentType;
    @BindView(R.id.tv_operator)
    TextView mTvOperator;
    @BindView(R.id.tv_total_num)
    TextView mTvTotalNum;
    @BindView(R.id.tv_all_price)
    TextView mTvAllPrice;
    @BindView(R.id.rv_replenishment_order_detail)
    RecyclerView mRvReplenishmentOrderDetail;

    private List<ReplenishmentOrderModel> mReplenishmentOrderModelList = new ArrayList<>();
    @Override
    protected View initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle
            savedInstanceState) {
        return inflater.inflate(R.layout.fragment_replenishment_order_detail, container, false);
    }

    @Override
    protected void initView(View view) {
        activity.setLeftIcon(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                activity.getSupportFragmentManager().popBackStack();
            }
        });
        activity.setTitle("补货单");
        activity.setRightIcon("");
        for (int i = 0; i < 6; i++) {
            mReplenishmentOrderModelList.add(new ReplenishmentOrderModel());
        }
        mRvReplenishmentOrderDetail.setLayoutManager(new LinearLayoutManager(activity));
        mRvReplenishmentOrderDetail.setAdapter(new ReplenishmentOrderDetailAdapter(mReplenishmentOrderModelList));
    }
}
